package com.groupsmsproject;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class MainTabBarActivity extends TabActivity {
	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.main);
	    
	    TabHost tabHost = getTabHost();  
	    
	    TabSpec groupsTab=tabHost.newTabSpec("Groups");  
	    groupsTab.setIndicator("Groups",getResources().getDrawable(R.drawable.groupimage))
	    		 .setContent(new Intent(this, Groups.class));
	    tabHost.addTab(groupsTab);
	    
	    TabSpec smsTab=tabHost.newTabSpec("Send SMS");  
	    smsTab.setIndicator("Send SMS",getResources().getDrawable(R.drawable.smsimage))
	    	  .setContent(new Intent(this, SMSMessaging.class));
	    tabHost.addTab(smsTab);
	  
	    tabHost.setCurrentTabByTag("Send SMS");
    }
}